package com.russell.pms.model;

import javax.xml.bind.annotation.XmlRootElement;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

@XmlRootElement(name = "payment")
public class Payment extends BaseObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8221577041674135487L;
	private int id;

	@Override
	public boolean equals(Object o) {
		if (!(o instanceof Payment)) {
			return false;
		}
		Payment rhs = (Payment) o;
		return new EqualsBuilder().append(this.id, rhs.id).isEquals();
	}

	public int getId() {
		return id;
	}

	@Override
	public int hashCode() {
		return new HashCodeBuilder(1, 31).append(id).toHashCode();

	}

	public void setId(int id) {
		this.id = id;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
				.append("id", this.id).toString();
	}

}
